package com.golddaymicromall.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.bumptech.glide.Glide;
import com.golddaymicromall.activity.panicbuying.PanicBuyingActivity;
import com.golddaymicromall.activity.tickert.TicketActivity;
import com.golddaymicromall.base.BaseActivity;
import com.golddaymicromall.util.ActivityController;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SpecialColumnActivity extends BaseActivity {

    @Bind(R.id.column_back)
    LinearLayout columaBack;
    @Bind(R.id.panic)
    LinearLayout mpanic;
    @Bind(R.id.panicimage)
    ImageView panicImage;
    @Bind(R.id.ticket)
    ImageView ticketImage;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_special_column);
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        Glide.with(this).load(R.drawable.qianggou)
                .centerCrop()
                .into(panicImage);
        panicImage.setAlpha(100);
        Glide.with(this).load(R.drawable.choujiang)
                .centerCrop()
                .into(ticketImage);
        ticketImage.setAlpha(100);
    }

    @OnClick({R.id.column_back, R.id.panic, R.id.ticket})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.column_back:
                finish();
                ActivityController.getInstance().removeActivity(this);
                break;
            case R.id.panic:
                Intent intent_panicbuying = new Intent(this, PanicBuyingActivity.class);
                startActivity(intent_panicbuying);
                break;
            case R.id.ticket:
                startActivity(new Intent(this, TicketActivity.class));
                break;
        }
    }

}
